using Mapster;
using SmartAgricultureService.Tables;

namespace SmartAgricultureService.Models.Tables
{
    public class CropInfo
    {
        public string Id { get; set; }
        public string Name { get; set; }
        public decimal Temperature { get; set; }
        public decimal Humidity { get; set; }
        public decimal Illumination { get; set; }
        public bool Active { get; set; }
        public bool Delete { get; set; }
        public static TypeAdapterConfig GetAdapterConfig()
        {
            return new TypeAdapterConfig().NewConfig<CropEntry, CropInfo>()
                .Map(dest => dest.Id, src => src.Id)
                .Map(dest => dest.Name, src => src.Name)
                .Map(dest => dest.Temperature, src => src.Temperature)
                .Map(dest => dest.Humidity, src => src.Humidity)
                .Map(dest => dest.Illumination, src => src.Illumination)
                .Map(dest => dest.Active, src => src.Active)
                .Map(dest => dest.Delete, src => src.Delete)
                .Config;
        }
    }
}